package cn.shape;

import java.awt.*;

public class PenShape extends Shape{

    @Override
    public void draw(Graphics2D g) {
        g.drawLine(x1,y1,x2,y2);
        //不断地更新起点坐标，类似微积分
        x1 = x2;
        y1 = y2;
    }
}
